package com.page.demo.controller;

import com.page.demo.pojo.User;
import com.page.demo.service.Impl.UserServiceImpl;
import com.page.demo.service.UserService;

public class UserController {
    UserService userService = new UserServiceImpl();

    public String login(String username,String password,Integer type){
        User user = new User();
        user.setUsername(username);
        user.setPassword(password);
        user.setType(type);
        String string = userService.checkUser(user);
        return string;
    }

    public String register(User user){
        String register = userService.register(user);
        return register;
    }
}
